package com.study.scala.lesson01

object sum00 {
  def sum(a:Int,b:Int): Int = {
    var sum:Int = 0
    var i:Int = 0
    for(i <- a to b) {
      sum += i
    }
    return sum
  }
  def main(args: Array[String]): Unit = {
        println(sum(1,4))
  }
}